package com.michale.system.mapper.permissions;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.michale.common.domain.permissions.RoleMenuEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @Auther Michale
 * @apiNote 角色和菜单关联表 mapper类
 */
@Mapper
public interface RoleMenuMapper extends BaseMapper<RoleMenuEntity> {

    /**
     * 批量删除角色菜单关联信息
     *
     * @param roleIds 需要删除的数据ID
     */
    void deleteRoleMenu(Long[] roleIds);

    /**
     * 通过角色ID删除角色和菜单关联
     *
     * @param roleId 角色ID
     * @return 结果
     */
    int deleteRoleMenuByRoleId(@Param("roleId") Long roleId);

}
